Skip to content

Conversation

@Andrii9090-tecnativa
Copy link

@Andrii9090-tecnativa Andrii9090-tecnativa commented Jan 15, 2026

When attempting to duplicate a contact (res.partner model), users with limited invoice permissions receive a permission error. The duplication is not completed because the system attempts to read the insurance_credit_limit and risk_insurance_coverage_percent fields.
And I add copy=False for risk_insurance_requested, risk_insurance_grant_date, risk_insurance_code, risk_insurance_code_2.

Captura desde 2026-01-15 13-01-12 image

With this small fix we can duplicate a contact
image

MT-13337
@moduon

@OCA-git-bot
Copy link
Contributor

Hi @yajo, @sergio-teruel, @Daniel-CA, @Shide, @Tardo, @rafaelbn, @omar7r,
some modules you are maintaining are being modified, check this out!

@Andrii9090-tecnativa Andrii9090-tecnativa marked this pull request as ready for review January 15, 2026 15:07
Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you should apply it to the other fields, as they wouldn't be relevant for a new company. For example, the risk_insurance_code.

@Andrii9090-tecnativa Andrii9090-tecnativa force-pushed the 18.0-fix-partner_risk_insurance-copy_contact branch from cda631b to da58e64 Compare January 16, 2026 08:05
@Andrii9090-tecnativa
Copy link
Author

Maybe you should apply it to the other fields, as they wouldn't be relevant for a new company. For example, the risk_insurance_code.
Hello @chienandalu! It's a good idea.
I added copy=False for risk_insurance_requested, risk_insurance_grant_date, risk_insurance_code, risk_insurance_code_2 fields.

Copy link
Member

@flotho flotho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

Thanks for this fix, LGTM

@Shide
Copy link
Contributor

Shide commented Jan 19, 2026

@Andrii9090 add copy=False to credit_policy_state_id, credit_policy_insure_invoices, credit_policy_company_id too

When attempting to duplicate a contact (res.partner model),
users with limited invoice permissions receive a permission error.
The duplication is not completed because the system attempts to read
the insurance_credit_limit and risk_insurance_coverage_percent fields.

MT-13337
@Andrii9090-tecnativa Andrii9090-tecnativa force-pushed the 18.0-fix-partner_risk_insurance-copy_contact branch from da58e64 to a63d6b0 Compare January 19, 2026 09:06
Copy link
Contributor

@Shide Shide left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code lgtm

Copy link
Member

@chienandalu chienandalu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Member

@yajo yajo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/ocabot merge patch

@OCA-git-bot
Copy link
Contributor

On my way to merge this fine PR!
Prepared branch 18.0-ocabot-merge-pr-538-by-yajo-bump-patch, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit 11447da into OCA:18.0 Jan 20, 2026
7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at ad32e50. Thanks a lot for contributing to OCA. ❤️

@Andrii9090-tecnativa Andrii9090-tecnativa deleted the 18.0-fix-partner_risk_insurance-copy_contact branch January 21, 2026 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants